//
//  UILabel+Extension.swift
//  Sina
//
//  Created by 王亮龙1 on 16/5/24.
//  Copyright © 2016年 lianglong. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(title: String, font: CGFloat, textColor: UIColor, alignment: NSTextAlignment = .Center) {
        
        self.init()
        self.text = title
        self.font = UIFont.systemFontOfSize(font)
        self.textColor = textColor
        
        if alignment == .Left {
            
            preferredMaxLayoutWidth = UIScreenWidth - 2 * StatusCellMargin
        }
        
        self.numberOfLines = 0
        
        sizeToFit()
        
        
    }
}